#include <QCoreApplication>
#include <iostream>
using namespace std;

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    int Edinica;
    float Massa;
    cout<<"Vvedite edinicu massi: "<<endl;
    cout<<"(1 - Kilogramm, 2 - Milligramm, 3 - Gramm, 4 - Tonna, 5 - Centner)"<<endl;
      cin>>Edinica;
      switch (Edinica)
      {
        case 1:cout<<"Vvedite Massu:   "<<endl;
          cin>>Massa;
          cout<<Massa<<"  Kilogrammov = "<<Massa<<" Kilogramm";
          break;
        case 2:cout<<"Vvedite Massu:   "<<endl;
          cin>>Massa;
          cout<<Massa<<"  Milligrammov = "<<Massa/1000000<<" Kilogramm";
          break;
        case 3:cout<<"Vvedite Massu:   " <<endl;
          cin>>Massa;
          cout<<Massa<<"  Gramm = "<<Massa/1000<<" Kilogramm";
          break;
        case 4:cout<<"Vvedite Massu:   "<<endl;
          cin>>Massa;
          cout<<Massa<<"  Tonn = "<<Massa*1000<<" Kilogramm";
          break;
        case 5:cout<<"Vveditu Massu:  "<<endl;
          cin>>Massa;
          cout<<Massa<<"  Centnerov = "<<Massa*100<<" Kilogramm";
          break;
      default:
            cout<<"Nuzhni znacheniya ot 1 do 5" ;
            break;
      }

    return a.exec();
}
